<section>
  <!-- main content start-->
  <div class="main-content" >
    <form [formGroup]="camForm" id="documentForm"  class="form-horizontal">
    <!-- header section end-->
    <div class="panel-body" style="margin-bottom: -15px;z-index: 100">
        <span>
          <i class="fa fa-2x fa-long-arrow-left" (click)="comeBack()" id="btn_back" ></i>&nbsp;&nbsp;&nbsp;
          <i class="fa fa-2x fa-save" (click)="onSubmit(camForm.value)" id="btn_submit"></i>
       </span>
    </div>
    <!--body wrapper start-->
    <div class="wrapper">
      <div class="row">
        <div class="col-md-12">
          <section class="panel">
            <div class="panel-body">

              <div class="col-lg-12">
                <div class="form-group">
                  <label><span class="necessary">*</span>&nbsp;主题</label>
                    <input formControlName="subject" type="text" class="form-control " id="subject"/>
                </div>
              </div>

              <div class="col-lg-6">
                <div class="form-group">
                  <label><span class="necessary">*</span>&nbsp;用车性质</label>
                  <select formControlName="purpose" class="selectpicker form-control" id="purpose">
                    <!--<option value="">请选择会议室</option>-->
                    <option *ngFor="let purpose of purposes"  [value]="purpose.oid">{{purpose.name}}</option>
                  </select>
                </div>
              </div>

              <div class="col-md-6">
                <div class="form-group">
                  <label><span class="necessary">*</span>&nbsp;同乘人数</label>
                  <input formControlName="passengerNum" class="form-control" type="text" id="passengerNum" />
                </div>
              </div>

              <div class="col-md-6">
                <div class="form-group">
                    <label><span class="necessary">*</span>&nbsp;开始时间</label>
                      <div class="input-group date" id="startDate">
                        <input readonly formControlName="starttimeToString" class="form-control" type="text" id="starttime"/>
                        <span class="input-group-addon">
                          <span class="fa fa-calendar"></span>
                        </span>
                      </div>
                 </div>
              </div>

                <div class="col-md-6">
                    <div class="form-group">
                    <label><span class="necessary">*</span>&nbsp;预计结束时间</label>
                        <div class="input-group date" id="endDate">
                          <input readonly formControlName="endtimeToString" class="form-control" type="text" id="endtime" />
                          <span class="input-group-addon" >
                            <span class="fa fa-calendar"></span>
                          </span>
                        </div>
                    </div>
                </div>

              <div class="col-md-6">
                <div class="form-group" >
                  <label ><span class="necessary">*</span>&nbsp;联系人</label>
                    <input formControlName="contact" class="form-control" type="text" id="contact" />
                </div>
              </div>
              <div class="col-md-6">
                <div class="form-group" >
                  <label><span class="necessary">*</span>&nbsp;手机号码</label>
                    <input formControlName="phone" class="form-control" type="text" id="phone" />
                </div>
              </div>
              <div class="col-md-6">
                <div class="form-group" >
                  <label><span class="necessary">*</span>&nbsp;出发地</label>
                    <input formControlName="startpoint" id="startpoint" type="text" class="form-control">
                  </div>
              </div>
              <div class="col-md-6">
                <div class="form-group">
                  <label><span class="necessary">*</span>&nbsp;目的地</label>
                    <input formControlName="endpoint" id="endpoint" type="text" class="form-control" >
                </div>
              </div>

              <div class="col-md-6">
                <div class="form-group" >
                  <label>是否同意拼车</label>
                    <label nz-checkbox [(ngModel)]="_checked" id="shared" formControlName="shared">
                    </label>
                  </div>
              </div>

              <div class="col-md-12">
                <div class="form-group">
                  <label>事由</label>
                    <textarea rows="4" formControlName="reason" class="form-control textareastyle" id="reason" ></textarea>
                </div>
              </div>

                <div class="col-md-11">
                  <div class="form-group" >
                    <label>同乘人员</label>
                      <input type="hidden" formControlName="passengers" id="passengers">
                      <textarea rows="4" readonly formControlName="res01" class="form-control textareastyle" id="res01" ></textarea>
                  </div>
                </div>

              <div class="col-md-1" style="margin-top: 26px;padding-left: 4%;">
                <div class="form-group" >
                  <button id="btn_select" class="btn btn-primary" type="button"
                          style="margin-bottom: 11px;" (click)="btn_select_onclick()">选择</button>
                  <button id="btn_clear" class="btn btn-primary" type="button" (click)="btn_clear()"
                          style="margin-bottom: 11px;">清空</button>
                </div>
              </div>


              <div class="col-md-12">
                <div class="form-group">
                  <label>申请备注</label>
                    <textarea rows="4" formControlName="description" class="form-control textareastyle" id="description"></textarea>
                </div>
              </div>

              <div class="col-md-12">
                <div class="form-group">
                  <label>附件</label>
                    <app-file-upload></app-file-upload>
                </div>
              </div>
            </div>
          </section>
        </div>
      </div>
      <!--body wrapper end-->

      </div>
    </form>
  </div>
  <!-- main content end-->
</section>


<!-- 人员部门群组开窗modal -->
<nz-modal id="udgModal"  [nzVisible]="udgIsVisible" [nzTitle]="'人员开窗'" [nzContent]="udgModalContent"
          [nzFooter]="false" (nzOnCancel)="udgHandleCancel($event)" >
  <ng-template #udgModalContent>
    <app-udg-table></app-udg-table>
    <div class="modal-footer">
      <button id="btn_udgsubmit" class="btn btn-primary" type="button" (click)="udgSearch()">确定</button>
      <button  class="btn btn-primary" type="button" (click)="udgHandleCancel($event)">取消</button>
    </div>
  </ng-template>
</nz-modal>
<!-- modal -->

